<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>

    <style>
        * {
            margin: 0;
            padding: 0;
            list-style: none;
        }

        html,
        body {
            width: 100%;
            height: 100%;
            background: #f4f4f4;
            position: absolute;
        }

        .wrap {
            width: 302px;
            margin: 150px auto;
            position: relative;
        }

        .wrap .header div {
            width: 100px;
            height: 35px;
            line-height: 35px;
            text-align: center;
            float: left;
        }

        .wrap .header div.active {
            position: relative;
            border: 1px solid #ccc;
            border-bottom: 0;
            background: white;
            z-index: 999;
        }

        .wrap .content {
            position: absolute;
            top: 35px;
            left: 0;
            background: white;
            border: 1px solid #ccc;
            width: 302px;
            height: 300px;

        }

        .wrap .content div {
            display: none;
            text-align: center;
            line-height: 300px;
        }

        .wrap .content div.active {
            display: block;
        }
    </style>
</head>

<body>
    <div class="wrap">
        <div class="header">
            <div class="active">1</div>
            <div>2</div>
            <div>3</div>
        </div>
        <div class="content">
            <div class="active">内容一</div>
            <div>内容二</div>
            <div>内容三</div>
        </div>
    </div>
    <script>
    </script>
</body>

</html>